-
-
Notifications
You must be signed in to change notification settings - Fork 626
chore: update_root, sync_root_with_cwd, refactor with move_missing_val #1359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I haven't forgotten about the git concurrency... just poking away until I find a nice solution. |
lua/nvim-tree/utils.lua
Outdated
-- @param dst_pos value pos | ||
function M.move_missing_val(src, src_path, src_pos, dst, dst_path, dst_pos) | ||
if | ||
not pcall(vim.validate, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can deliberaly fail when this function is called with the wrong arguments instead of silently returning ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works. Are you thinking of a warning message?
Signing off for now... I'll get to this on the weekend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 have a good week !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated. This is a nice pattern we can use more.
[NvimTree] move_missing_val: dst_path: expected string, got number
Thanks @alex-courtis, please rebase :) |
update_to_buf_dir is now replaced with hijack_directories. That said, I never had any use fot it. update_cwd was depreated in favour of sync_root_with_cwd. nvim-tree/nvim-tree.lua#1359
nvim-tree#1359) * chore: opts.update_focused_file.update_cwd -> update_root * chore: opts.update_cwd -> sync_root_with_cwd * chore: refactor options with utils move_missing_val * chore: refactor options with utils move_missing_val * chore: refactor options with utils move_missing_val * chore: refactor options with utils move_missing_val * chore: refactor options with utils move_missing_val * chore: refactor options with utils move_missing_val
closes #1342 , refactoring some options
move_missing_val
took too long to write :(validate_options
is the bit I'd like you to review.